From: Florian Müllner Date: Tue, 30 Jan 2024 16:27:32 +0000 (+0100) Subject: ci: Do not create pipelines for branches with open MRs X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~281^2~2^2~55 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=d3e96a36ce14c8d81d14db628ee53ed4296a2e5f;p=gnome-shell.git ci: Do not create pipelines for branches with open MRs Pipelines for non-protected branches are set to 'manual', and thus cheap. However they may still get picked by `@marge-bot`, meaning that the bot waits for the completion of a pipeline that never starts. Avoid that by not creating pipelines for branches with open merge requests. Credit to Jordan, who came up with this for gst. Part-of: --- diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 8d881ba7f..bebbf7e50 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -35,6 +35,8 @@ variables: workflow: rules: + - if: '$CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS && $CI_PIPELINE_SOURCE == "push"' + when: never - if: '$CI_MERGE_REQUEST_IID' - if: '$CI_COMMIT_TAG' - if: '$CI_COMMIT_BRANCH'